package com.aliothservice.catfish.device.data;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class HumidityObject {
	
	public Map<String, Object> toMap() {
		Map<String, Object> map = new HashMap<String, Object>();
		
		map.put("humidity", Integer.valueOf(this.getHumidity()));
		map.put("longitude", Double.valueOf(this.getLongitude()));
		map.put("latitude", Double.valueOf(this.getLatitude()));
		DateFormat fullFormatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
		map.put("dateOfRecord", fullFormatter.format(this.getDateOfRecord()));

		return map;
	}
	
	private int humidity;
	private double longitude;
	private double latitude;
	private Date dateOfRecord;

	public Date getDateOfRecord() {
		return dateOfRecord;
	}

	public void setDateOfRecord(Date dateOfRecord) {
		this.dateOfRecord = dateOfRecord;
	}

	public int getHumidity() {
		return humidity;
	}

	public void setHumidity(int humidity) {
		this.humidity = humidity;
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	
}
